package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysTopicMapper;
import com.ruoyi.system.domain.SysTopic;
import com.ruoyi.system.service.ISysTopicService;
import com.ruoyi.common.core.text.Convert;

/**
 * 【请填写功能名称】Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-10-26
 */
@Service
public class SysTopicServiceImpl implements ISysTopicService 
{
    @Autowired
    private SysTopicMapper sysTopicMapper;

    /**
     * 查询【请填写功能名称】
     * 
     * @param topicid 【请填写功能名称】主键
     * @return 【请填写功能名称】
     */
    @Override
    public SysTopic selectSysTopicByTopicid(Long topicid)
    {
        return sysTopicMapper.selectSysTopicByTopicid(topicid);
    }
    @Override
    public SysTopic selectSysTopicByTopicid1(Long topicid)
    {
        return sysTopicMapper.selectSysTopicByTopicid1(topicid);
    }

    /**
     * 查询【请填写功能名称】列表
     * 
     * @param sysTopic 【请填写功能名称】
     * @return 【请填写功能名称】
     */
    @Override
    public List<SysTopic> selectSysTopicList(SysTopic sysTopic)
    {
        return sysTopicMapper.selectSysTopicList(sysTopic);
    }

    /**
     * 新增【请填写功能名称】
     * 
     * @param sysTopic 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int insertSysTopic(SysTopic sysTopic)
    {
        return sysTopicMapper.insertSysTopic(sysTopic);
    }

    /**
     * 修改【请填写功能名称】
     * 
     * @param sysTopic 【请填写功能名称】
     * @return 结果
     */
    @Override
    public int updateSysTopic(SysTopic sysTopic)
    {
        return sysTopicMapper.updateSysTopic(sysTopic);
    }

    /**
     * 批量删除【请填写功能名称】
     * 
     * @param topicids 需要删除的【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteSysTopicByTopicids(String topicids)
    {
        return sysTopicMapper.deleteSysTopicByTopicids(Convert.toStrArray(topicids));
    }

    /**
     * 删除【请填写功能名称】信息
     * 
     * @param topicid 【请填写功能名称】主键
     * @return 结果
     */
    @Override
    public int deleteSysTopicByTopicid(Long topicid)
    {
        return sysTopicMapper.deleteSysTopicByTopicid(topicid);
    }
    @Override
    public  List<SysTopic> selectTopicByTypeid(Integer typeid,String key)
    {
        return  sysTopicMapper.selectSysTopicByTypeid(typeid,key);
    }
    @Override
    public  List<SysTopic> selectTopicByUserid(Long userid)
    {
        return sysTopicMapper.selectTopicByUserid(userid);
    }
    @Override
    public  void increaseDowncount(Long topicid)
    {
        sysTopicMapper.increaseDowncount(topicid);
    }
}
